<include file="Index:header" />
<!--头部 end -->
<!--左栏 starts -->
<div class="container-fluid">
		<div class="row-fluid">
			<include file="left" />

			<div id="content" class="span10">
			<!-- content starts -->
<!--左栏 end -->
<ul class="breadcrumb">
      <li>
        <a href="__APP__/TIFAWEB_DSWJCMS.html">首页</a> <span class="divider">/</span>
      </li>
      <li class="active">{$pname}</li>
      <div  class="pull-right"> <a data-toggle="modal" data-rel="tooltip" href="#audit">添加{$pname}</a></div>
</ul>
<table class="table table-striped table-bordered table-condensed datatable ">
            <thead>
              <tr>
              	<th>联动值</th>
                <th>联动名</th>
                <th>状态</th>
                <th style="width:100px;">排序</th>
                <th>操作</th>
              </tr>
            <thead>
            <tbody>
            <volist name="list" id="vo">
                <tr>
                <td>
                      {$vo.value}
                </td>
                <td>
                       {$vo.name}
                </td>
                <td class="form-inline">
                <if condition="$vo.state eq 0">
               <label class="radio"><input type="radio" name="state{$vo.id}" value="0" class="noty" checked data-noty-options='{"text":"修改成功","layout":"center","type":"success"}' onclick='var state=$(this).val();$.post("__APP__/TIFAWEB_DSWJCMS/Ganged/savegan", { id:{$vo.id},state:state} );'/> 显示</label>
              <label class="radio"><input type="radio" name="state{$vo.id}" value="1" class="noty" data-noty-options='{"text":"修改成功","layout":"center","type":"success"}' onclick='var state=$(this).val();$.post("__APP__/TIFAWEB_DSWJCMS/Ganged/savegan", { id:{$vo.id},state:state} );'/> 隐藏</label>
               <else />
               <label class="radio"><input type="radio" name="state{$vo.id}" value="0" class="noty"data-noty-options='{"text":"修改成功","layout":"center","type":"success"}' onclick='var state=$(this).val();$.post("__APP__/TIFAWEB_DSWJCMS/Ganged/savegan", { id:{$vo.id},state:state} );'/> 显示</label>
              <label class="radio"><input type="radio" name="state{$vo.id}" value="1" checked class="noty" data-noty-options='{"text":"修改成功","layout":"center","type":"success"}' onclick='var state=$(this).val();$.post("__APP__/TIFAWEB_DSWJCMS/Ganged/savegan", { id:{$vo.id},state:state} );'/> 隐藏</label>
              </if>
                </td>
                <td>
                   <input data-noty-options='{"text":"修改成功","layout":"center","type":"success"}' name="order" type="text" value="{$vo.order}" class="span8 notys" onblur='var order=$(this).val();$.post("__APP__/TIFAWEB_DSWJCMS/Ganged/savegan", { id:{$vo.id},order:order} );'/>
                </td>     
                <td>
                    <a href="#edit" data-toggle="modal" data-rel="tooltip" class="icon icon-color icon-edit" title="编辑" onclick='edit({$vo.id})'></a>
                    <a href="#" data-rel="tooltip" class="icon icon-color icon-trash"title="删除" onclick="if(confirm('是否要删除？'))window.location.href='__APP__/TIFAWEB_DSWJCMS/Ganged/exitgan/{$vo.id}'"></a>
                </td>
              </tr>
            </volist>
            </tbody>
          </table>
<div>
</div>
<!--添加{$pname} start-->
<div id="audit" class="modal hide fade">
    
    <div class="modal-header">
      <a class="close" data-dismiss="modal" >&times;</a>
      <h3>添加{$pname}</h3>
    </div>
    <form method="post"  action='__APP__/TIFAWEB_DSWJCMS/Ganged/tfAdd'>
    <input name="q" type="hidden" value="unite" />
    <input name="u" type="hidden" value="__APP__/TIFAWEB_DSWJCMS/Ganged/index/{$Think.get.id}.html" />
    <input name="n" type="hidden" value="{$pname}添加" />
    <input name="pid" type="hidden" value="{$Think.get.id}" />
    <table class="table">
        <tbody>
          <tr>
            <td>
                   联动名：
            </td>
            <td>
              <input name="name" type="text" class="span6" placeholder="请输入联动名...">
            </td>
          </tr>
          <tr>
            <td>
                   联动值：
            </td>
            <td>
              <input name="value" type="text" class="span6" placeholder="请输入联动值...">
            </td>
          </tr>
          <tr>
            <td>
                   状态：
            </td>
            <td class="form-inline">
                <label class="radio"><input type="radio" name="state" value="0" checked/> 显示</label>
                <label class="radio"><input type="radio" name="state" value="1" /> 隐藏</label>
            </td>
          </tr>
          <tr>
            <td>
                   排序：
            </td>
            <td>
              <input name="order" type="text" class="span2" value="5">
            </td>
          </tr>
        </tbody>      
    </table>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">关闭</a>
        <button type="submit" class="btn btn-primary" >确认添加</button>
    </div>
    </form>
</div>
<!--添加{$pname} end-->
<!--编辑{$pname} start-->
<div id="edit" class="modal hide fade">
    
    <div class="modal-header">
      <a class="close" data-dismiss="modal" >&times;</a>
      <h3>编辑{$pname}</h3>
    </div>
    <form method="post"  action='__APP__/TIFAWEB_DSWJCMS/Ganged/tfUpda'>
    <input name="q" type="hidden" value="unite" />
    <input name="u" type="hidden" value="__APP__/TIFAWEB_DSWJCMS/Ganged/index/{$Think.get.id}.html" />
    <input name="n" type="hidden" value="{$pname}更新" />
    <div id='edits'></div>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">关闭</a>
        <button type="submit" class="btn btn-primary" >确认更新</button>
    </div>
    </form>
</div>
<!--编辑{$pname} end-->
<!--底部 -->
<include file="Index:footer" />
